package com.tepth.remote.control.delegate.home;

import com.tepth.remote.core.net.callback.IError;
import com.tepth.remote.core.net.callback.ISoapSuccess;
import com.tepth.remote.core.net.callback.ISuccess;
import com.tepth.remote.core.net.retrofit.RxRetrofitClient;
import com.tepth.remote.core.net.soap.SoapClient;

import java.util.WeakHashMap;

/**
 * Description:
 *
 * @author Hequn.Lee
 * @date 2018/11/18
 */
public class HomeModel implements HomeContract.Model {
    @Override
    public void getSubordinate(WeakHashMap<String, Object> params,
                               String methodName,
                               String nameSpace,
                               ISoapSuccess success,
                               IError error) {
        SoapClient.builder().params(params)
                .methodName(methodName)
                .nameSpace(nameSpace)
                .success(success)
                .error(error)
                .builder()
                .post();
    }

    @Override
    public void getVersion(String url,
                           ISuccess success,
                           IError error) {
        RxRetrofitClient.builder()
                .url(url)
                .success(success)
                .error(error)
                .builder()
                .getOriginal();
    }
}
